package com.sunnuwell.demo.repository;

import com.sunnuwell.demo.entity.Role;
import com.sunnuwell.demo.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.awt.print.Pageable;
import java.util.List;

/**
 * @program: entry
 * @description:
 * @author: Mr.lv
 * @create: 2019-04-24 10:44
 **/

public interface UserRepository extends MongoRepository<User, String> {
    /**
     * findByUsername 命名有研究，比如 findBy后面的名称是实体类属性名称
     * Username
     */
    public User findByUsername(String username);

    public User findByCid(String cid);

}